<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var obj = { label: '男', value: 1, age: 18 }

    function f(obj1) {
      return Object.values(obj1).map(item => item.toString())
    }
    var arr = f(obj);
    console.log(arr)
 // arr = ['男', '1', '18'] // 所有的属性值取出来，保存在数组中
  </script>
</body>

</html>